package lambda;


/**
 * @author LIBOFEI
 * @ClassName LambdaTest5
 * @description 线程创建方式
 * @date 2020/10/9 14:50
 * @Version 1.0
 **/
public class LambdaTest5 {

    public static void main(String[] args) {

        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i = 0 ; i < 10 ;i++){
                    System.out.println(Thread.currentThread() + ":" + i);
                }
            }
        }).start();


        new Thread(() -> {
            for(int i = 0 ; i < 10 ;i++){
                System.out.println(Thread.currentThread() + ":" + i);
            }
        }).start();
    }
}
